<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// 打开时检查是否登录，未登录则跳转到登录页面
			var token = uni.getStorageSync('token')
			if (this.$dm.isEmpty(token)) {
				uni.redirectTo({
					url: '../login/login'
				});
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import '/common/uni.css';
	@import '/uview-ui/index.scss';

	/* 整体布局 */
	.page {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background-color: $u-bg-color;
		min-height: 100vh;
		height: auto;
	}
</style>
